Alex Crichton [Tue, 9 Sep 2014 14:23:09 +0000 (07:23 -0700)]
More and more tests (cargo upload)
Alex Crichton [Tue, 9 Sep 2014 05:26:14 +0000 (22:26 -0700)]
Add tests exercising the registry source
Alex Crichton [Tue, 9 Sep 2014 02:38:32 +0000 (19:38 -0700)]
Add proxy configurations
Alex Crichton [Tue, 9 Sep 2014 02:38:16 +0000 (19:38 -0700)]
Test the output of `cargo package`
Alex Crichton [Mon, 8 Sep 2014 23:01:38 +0000 (16:01 -0700)]
Implement Sha256 bindings
These are used to verify the downloads of packages from the registry.
Alex Crichton [Fri, 18 Jul 2014 15:40:45 +0000 (08:40 -0700)]
Implement a registry source
# cargo upload
The cargo-upload command will take the local package and upload it to the
specified registry. The local package is uploaded as a tarball compressed with
gzip under maximum compression. Most of this is done by just delegating to
`cargo package` The host to upload to is specified, in order of priority, by a
command line `--host` flag, the `registry.host` config key, and then the default
registry. The default registry is still `example.com`
The registry itself is still a work in progress, but the general plumbing for a
command such as this would look like:
1. Ensure the local package has been compressed into an archive.
2. Fetch the relevant registry and login token from config files.
3. Ensure all dependencies for a package are listed as coming from the same
registry.
4. Upload the archive to the registry with the login token.
5. The registry will verify the package is under 2MB (configurable).
6. The registry will upload the archive to S3, calculating a checksum in the
process.
7. The registry will add an entry to the registry's index (a git repository).
The entry will include the name of the package, the version uploaded, the
checksum of the upload, and then the list of dependencies (name/version req)
8. The local `cargo upload` command will succeed.
# cargo login
Uploading requires a token from the api server, and this token follows the same
config chain for the host except that there is no fallback. To implement login,
the `cargo login` command is used. With 0 arguments, the command will request
that a site be visited for a login token, and with an argument it will set the
argument as the new login token.
The `util::config` module was modified to allow writing configuration as well as
reading it. The support is a little lacking in that comments are blown away, but
the support is there at least.
# RegistrySource
An implementation of `RegistrySource` has been created (deleting the old
`DummyRegistrySource`). This implementation only needs a URL to be constructed,
and it is assumed that the URL is running an instance of the cargo registry.
## RegistrySource::update
Currently this will unconditionally update the registry's index (a git
repository). Tuning is necessary to prevent updating the index each time (more
coming soon).
## RegistrySource::query
This is called in the resolve phase of cargo. This function is given a
dependency to query for, and the source will simply look into the index to see
if any package with the name is present. If found, the package's index file will
be loaded and parsed into a list of summaries.
The main optimization of this function is to not require the entire registry to
ever be resident in memory. Instead, only necessary packages are loaded into
memory and parsed.
## RegistrySource::download
This is also called during the resolve phase of cargo, but only when a package
has been selected to be built (actually resolved). This phase of the source will
actually download and unpack the tarball for the package.
Currently a configuration file is located in the root of a registry's index
describing the root url to download packages from.
This function is optimized for two different metrics:
1. If a tarball is downloaded, it is not downloaded again. It is assumed that
once a tarball is successfully downloaded it will never change.
2. If the unpacking destination has a `.cargo-ok` file, it is assumed that the
unpacking has already occurred and does not need to happen again.
With these in place, a rebuild should take almost no time at all.
## RegistrySource::get
This function is simply implemented in terms of a PathSource's `get` function by
creating a `PathSource` for all unpacked tarballs as part of the `download`
stage.
## Filesystem layout
There are a few new directories as part of the `.cargo` home folder:
* `.cargo/registry/index/$hostname-$hash` - This is the directory containing the
actual index of the registry. `$hostname` comes from its url, and `$hash` is
the hash of the entire url.
* `.cargo/registry/cache/$hostname-$hash/$pkg-$vers.tar.gz` - This is a
directory used to cache the downloads of packages from the registry.
* `.cargo/registry/src/$hostname-$hash/$pkg-$vers` - This is the location of the
unpacked packages. They will be compiled from this location.
# New Dependencies
Cargo has picked up a new dependency on the `curl-rust` package in order to send
HTTP requests to the registry as well as send HTTP requests to download
tarballs.
bors [Tue, 16 Sep 2014 17:43:43 +0000 (17:43 +0000)]
auto merge of #581 : alexcrichton/cargo/manpage, r=brson
Closes #578
Alex Crichton [Tue, 16 Sep 2014 16:38:35 +0000 (09:38 -0700)]
Add a manpage
Closes #578
bors [Mon, 15 Sep 2014 19:13:42 +0000 (19:13 +0000)]
auto merge of #558 : alexcrichton/cargo/issue-553, r=brson
Alex Crichton [Thu, 11 Sep 2014 15:09:47 +0000 (08:09 -0700)]
Pass profile env vars to build commands
Closes #553
Alex Crichton [Thu, 11 Sep 2014 15:01:41 +0000 (08:01 -0700)]
Run tests with the --target flag
bors [Mon, 15 Sep 2014 17:44:47 +0000 (17:44 +0000)]
auto merge of #574 : rust-lang/cargo/fix-win64, r=brson
These commits fix all tests and installation utilities on win64. I've confirmed that these are a green build on the bots.
Alex Crichton [Fri, 12 Sep 2014 15:02:14 +0000 (08:02 -0700)]
Rewrite git tests to not rely on the CLI
The CLI has started to have differences on windows than on other systems, and
instead of coding against multiple CLI versions, instead just rewrite everything
to use libgit2.
bors [Mon, 15 Sep 2014 16:43:46 +0000 (16:43 +0000)]
auto merge of #537 : markberger/cargo/510-hg-flag, r=alexcrichton
Allows the client to initialize a mercurial repo when creating a new cargo project with `cargo new --hg`. This would close #510.
This is my first time writing code in rust outside of a toy program so please feel free to tear it apart or suggest an alternative solution.
Alex Crichton [Fri, 12 Sep 2014 03:06:39 +0000 (20:06 -0700)]
Tweak the install script for windows nightlies
bors [Mon, 15 Sep 2014 15:35:26 +0000 (15:35 +0000)]
auto merge of #576 : alexcrichton/cargo/update, r=alexcrichton
Alex Crichton [Mon, 15 Sep 2014 15:31:21 +0000 (08:31 -0700)]
Update to rust master
Mark J. Berger [Fri, 5 Sep 2014 15:23:57 +0000 (08:23 -0700)]
Create hg repo with --hg flag on cargo new
bors [Sat, 13 Sep 2014 16:28:49 +0000 (16:28 +0000)]
auto merge of #575 : mbrubeck/cargo/sleep, r=alexcrichton
Travis is showing intermittent failures in `test_cargo_compile_path_deps::path_dep_build_cmd` and `test_cargo_compile_git_deps::git_dep_build_cmd` (added in #561 and #563).
I haven't managed to reproduce these failures locally, but I suspect the tests are timing-sensitive. This tries to fix the failure by sleeping for a second between the two operations.
Matt Brubeck [Sat, 13 Sep 2014 04:49:35 +0000 (21:49 -0700)]
Try to fix intermittent test failures
Travis is showing intermittent failures in
`test_cargo_compile_path_deps::path_dep_build_cmd` and
`test_cargo_compile_git_deps::git_dep_build_cmd` (added in #561 and #563).
I haven't managed to reproduce these failures locally, but I suspect the tests
are timing-sensitive. This tries to guarantee that the timestamps during the
two operations can't be the same.
bors [Sat, 13 Sep 2014 02:43:50 +0000 (02:43 +0000)]
auto merge of #563 : mbrubeck/cargo/list-files-git, r=alexcrichton
`list_files_git` assumes that the package is at the root of the git repository. This breaks when trying to list files for a package in a subdirectory of a repo, or in other cases, e.g. if the user's home directory is a git repo.
bors [Sat, 13 Sep 2014 01:43:38 +0000 (01:43 +0000)]
auto merge of #561 : mbrubeck/cargo/list_file_walk, r=alexcrichton
Previously this was calling `.is_file()` on a relative path. This would fail if the path was not relative to the current working directory, for example when listing files in a path dependency.
Matt Brubeck [Sat, 13 Sep 2014 01:05:10 +0000 (18:05 -0700)]
Better fix for tests on the Mac builders
bors [Sat, 13 Sep 2014 00:13:52 +0000 (00:13 +0000)]
auto merge of #569 : alexcrichton/cargo/update-git2, r=brson
This fixes some breaking changes with git2-rs, fixes a bug in tarball generation
from tar-rs, and fixes warnings with flate2-rs
bors [Fri, 12 Sep 2014 23:29:58 +0000 (23:29 +0000)]
auto merge of #566 : alexcrichton/cargo/issue-565, r=brson
When cloning a remote repository, the default behavior of libgit2 is to only
update the local ref that's actually checked out, when we actually would prefer
to update all refs of the remote repo. This removes a call to clone() to a
init_bare() + fetch() which should update all refs accordingly
Closes #565
Matt Brubeck [Fri, 12 Sep 2014 22:21:23 +0000 (15:21 -0700)]
Test for build commands in git subdirs
Matt Brubeck [Thu, 11 Sep 2014 21:09:44 +0000 (14:09 -0700)]
Fix list_files_git for paths in subdirs of a repo
list_files_git previously assumed that the package was always at the root of
the git repository. This broke when trying to list files for a package in a
subdirectory of a repo, or in other cases, e.g. if the user's home directory
is a git repo.
Matt Brubeck [Fri, 12 Sep 2014 16:22:02 +0000 (09:22 -0700)]
Fix tests on Mac builders
Comparing URIs in /tmp was failing because of symlinks.
Matt Brubeck [Thu, 11 Sep 2014 22:42:46 +0000 (15:42 -0700)]
Test for build command fingerprints in path deps
This tests the fix for list_files_walk from #561.
Matt Brubeck [Thu, 11 Sep 2014 19:00:11 +0000 (12:00 -0700)]
Fix bug in list_file_walk when cwd != path
Previously this was calling .is_file() on a relative path. This would fail if
the path was not relative to the current working directory, for example when
fingerprinting a path dependency.
Alex Crichton [Thu, 11 Sep 2014 21:30:13 +0000 (14:30 -0700)]
Don't clone remote repos, use fetch instead
When cloning a remote repository, the default behavior of libgit2 is to only
update the local ref that's actually checked out, when we actually would prefer
to update all refs of the remote repo. This removes a call to clone() to a
init_bare() + fetch() which should update all refs accordingly
Closes #565
bors [Fri, 12 Sep 2014 01:13:57 +0000 (01:13 +0000)]
auto merge of #564 : EduardoBautista/cargo/contributing-to-docs, r=alexcrichton
The docs are now in the main cargo repository.
Alex Crichton [Fri, 12 Sep 2014 00:05:33 +0000 (17:05 -0700)]
Update all dependencies
This fixes some breaking changes with git2-rs, fixes a bug in tarball generation
from tar-rs, and fixes warnings with flate2-rs
bors [Thu, 11 Sep 2014 23:43:55 +0000 (23:43 +0000)]
auto merge of #568 : mbrubeck/cargo/dist-fix, r=alexcrichton
Fixes a regression from #559.
Matt Brubeck [Thu, 11 Sep 2014 23:00:29 +0000 (16:00 -0700)]
Fix `make dist` and distcheck breakage
Fixes a regression from #559.
bors [Thu, 11 Sep 2014 22:58:54 +0000 (22:58 +0000)]
auto merge of #567 : EduardoBautista/cargo/fix-centering-on-safari, r=alexcrichton
The website is not centered in Safari.
Eduardo Bautista [Thu, 11 Sep 2014 21:39:04 +0000 (16:39 -0500)]
Center main content in Safari
bors [Thu, 11 Sep 2014 21:28:53 +0000 (21:28 +0000)]
auto merge of #555 : alexcrichton/cargo/issue-215, r=brson
Also print the commands only right before they're actually run.
Closes #215
Eduardo Bautista [Thu, 11 Sep 2014 21:12:26 +0000 (16:12 -0500)]
Update "Contributing to the Docs"
bors [Thu, 11 Sep 2014 20:28:53 +0000 (20:28 +0000)]
auto merge of #562 : alexcrichton/cargo/win64, r=alexcrichton
Alex Crichton [Thu, 11 Sep 2014 19:56:08 +0000 (12:56 -0700)]
Switch the URL from which nightlies are downloaded
Alex Crichton [Thu, 11 Sep 2014 20:13:43 +0000 (13:13 -0700)]
Peter Atashian [Thu, 11 Sep 2014 18:26:22 +0000 (14:26 -0400)]
Allows bootstrapping win64 from win32 snapshot.
Remove triple = 'i686-pc-mingw32' once win64 snapshot is made.
Signed-off-by: Peter Atashian <retep998@gmail.com>
bors [Thu, 11 Sep 2014 18:13:50 +0000 (18:13 +0000)]
auto merge of #559 : mbrubeck/cargo/make-install-fix, r=alexcrichton
This fixes an issue where `make dist` incorrectly does nothing after the source has changed and been rebuilt. It also prevents `make install` from installing outdated files from the `dist` directory.
Matt Brubeck [Thu, 11 Sep 2014 17:33:16 +0000 (10:33 -0700)]
Always rebuild dist dir in "make dist" or install
bors [Thu, 11 Sep 2014 15:43:50 +0000 (15:43 +0000)]
auto merge of #554 : bkoropoff/cargo/update-git2, r=alexcrichton
This is pretty simple. Do the existing unit tests sufficiently cover the git2-related changes?
Brian Koropoff [Thu, 11 Sep 2014 15:28:08 +0000 (08:28 -0700)]
Update snapshots.txt
Alex Crichton [Thu, 11 Sep 2014 14:35:01 +0000 (07:35 -0700)]
Don't print `Running` for commands that aren't run
Also print the commands only right before they're actually run.
Closes #215
Brian Koropoff [Thu, 11 Sep 2014 05:36:23 +0000 (22:36 -0700)]
Fix obsolete `extern crate` syntax in some of the tests
Brian Koropoff [Thu, 11 Sep 2014 05:29:14 +0000 (22:29 -0700)]
Fix build break by upgrading git2-rs
Update git2-rs to the latest version which includes a fix for `extern crate`
syntax changes. This version changes the interface for credential callbacks,
so update the git source provider code as well.
bors [Wed, 10 Sep 2014 23:24:02 +0000 (23:24 +0000)]
auto merge of #550 : alexcrichton/cargo/rustdoc, r=brson
* All markdown files are now rendered with `rustdoc` into HTML
* A JS syntax highlighter, prism, is included for TOML syntax highlighting.
* A new makefile target, `make doc`, will build docs into `target/doc`
preview: http://people.mozilla.org/~acrichton/crates.io/doc/
Closes #524
Alex Crichton [Sun, 7 Sep 2014 17:53:20 +0000 (10:53 -0700)]
Move to rustdoc instead of ruby's middleman
* All markdown files are now rendered with `rustdoc` into HTML
* A JS syntax highlighter, prism, is included for TOML syntax highlighting.
* A new makefile target, `make doc`, will build docs into `target/doc`
bors [Wed, 10 Sep 2014 18:27:54 +0000 (18:27 +0000)]
auto merge of #549 : alexcrichton/cargo/git-no-delete, r=brson
This primarily blows away all *submodules* as well, which sometimes can be quite
large and take some time to update. Instead, re-use an existing checkout, just
reset it to the right revision if possible.
Also, move the submodule update step to occur unconditionally to account for
corrupt submodule checkouts or interrupted downloads. This update step should be
much faster than `git submodule update` because we're using libgit2, so yay!
bors [Wed, 10 Sep 2014 18:03:21 +0000 (18:03 +0000)]
auto merge of #548 : alexcrichton/cargo/frobbing-git-deps, r=brson
The previous logic for recompiling any dependency was almost entirely based on
the mtimes of the relevant input files. This isn't quite what's desired for git
and registry dependencies because the mtime could be fluctuating while the files
aren't changing. For example:
1. Project A checks out git repo C at revision C1
2. Project A builds, records mtimes of C
3. Project B checks out git repo C at revision C2
4. Project B builds, records new mtimes of C
5. Project A is rebuilt, rebuilding C b/c mtimes are different
In step 5 here C should not be rebuilt because the revision didn't actually
change.
This commit alters git/registry dependencies to completely bypass the --dep-info
emitted and only rely on the git/registry source to inform what the fingerprint
is. This is the revision/version, respectively, and should be all that's
necessary to track changes to the repo and trigger a rebuild.
bors [Wed, 10 Sep 2014 17:43:52 +0000 (17:43 +0000)]
auto merge of #547 : alexcrichton/cargo/git2-for-package, r=brson
One forgotten spot to modify when migrating from the CLI to libgit2
bors [Wed, 10 Sep 2014 16:58:51 +0000 (16:58 +0000)]
auto merge of #542 : alexcrichton/cargo/issue-539, r=brson
Closes #539
Alex Crichton [Wed, 10 Sep 2014 14:47:11 +0000 (07:47 -0700)]
Don't blow away checked out git repos
This primarily blows away all *submodules* as well, which sometimes can be quite
large and take some time to update. Instead, re-use an existing checkout, just
reset it to the right revision if possible.
Also, move the submodule update step to occur unconditionally to account for
corrupt submodule checkouts or interrupted downloads. This update step should be
much faster than `git submodule update` because we're using libgit2, so yay!
Alex Crichton [Wed, 10 Sep 2014 14:26:42 +0000 (07:26 -0700)]
Don't recompile git deps so frequently
The previous logic for recompiling any dependency was almost entirely based on
the mtimes of the relevant input files. This isn't quite what's desired for git
and registry dependencies because the mtime could be fluctuating while the files
aren't changing. For example:
1. Project A checks out git repo C at revision C1
2. Project A builds, records mtimes of C
3. Project B checks out git repo C at revision C2
4. Project B builds, records new mtimes of C
5. Project A is rebuilt, rebuilding C b/c mtimes are different
In step 5 here C should not be rebuilt because the revision didn't actually
change.
This commit alters git/registry dependencies to completely bypass the --dep-info
emitted and only rely on the git/registry source to inform what the fingerprint
is. This is the revision/version, respectively, and should be all that's
necessary to track changes to the repo and trigger a rebuild.
Alex Crichton [Wed, 10 Sep 2014 14:01:32 +0000 (07:01 -0700)]
Use libgit2 for `git ls-files`
One forgotten spot to modify when migrating from the CLI to libgit2
bors [Wed, 10 Sep 2014 05:13:49 +0000 (05:13 +0000)]
auto merge of #546 : alexcrichton/cargo/docopt, r=huonw
Alex Crichton [Wed, 10 Sep 2014 05:01:39 +0000 (22:01 -0700)]
Switch the location of the docopt repo
bors [Tue, 9 Sep 2014 22:58:50 +0000 (22:58 +0000)]
auto merge of #543 : alexcrichton/cargo/doc-fixes, r=alexcrichton
Alex Crichton [Tue, 9 Sep 2014 22:51:28 +0000 (15:51 -0700)]
Fix some minor typos
Alex Crichton [Tue, 9 Sep 2014 22:01:31 +0000 (15:01 -0700)]
Add a NUM_JOBS env var to builds
Closes #539
bors [Tue, 9 Sep 2014 19:43:46 +0000 (19:43 +0000)]
auto merge of #534 : alexcrichton/cargo/issue-525, r=brson
Closes #525
r? @wycats
bors [Tue, 9 Sep 2014 15:13:47 +0000 (15:13 +0000)]
auto merge of #536 : superlogical/cargo/master, r=alexcrichton
So that it compiles and works
Alex Crichton [Mon, 8 Sep 2014 00:07:07 +0000 (17:07 -0700)]
Clarify why bins have Cargo.lock but libs don't
Closes #525
jakescott [Tue, 9 Sep 2014 04:30:25 +0000 (16:30 +1200)]
fix sample code to do with color-rs. Renamed HSV to Hsv and RGB to Rgb so that it compiles and works
bors [Tue, 9 Sep 2014 02:13:47 +0000 (02:13 +0000)]
auto merge of #528 : alexcrichton/cargo/deadlock, r=brson
bors [Mon, 8 Sep 2014 22:28:48 +0000 (22:28 +0000)]
auto merge of #532 : alexcrichton/cargo/issue-530, r=brson
Closes #530
bors [Mon, 8 Sep 2014 21:28:50 +0000 (21:28 +0000)]
auto merge of #529 : alexcrichton/cargo/msys2-build, r=brson
bors [Mon, 8 Sep 2014 19:28:52 +0000 (19:28 +0000)]
auto merge of #527 : alexcrichton/cargo/build-issues, r=brson
Related issues in the commits.
bors [Mon, 8 Sep 2014 18:43:54 +0000 (18:43 +0000)]
auto merge of #516 : alexcrichton/cargo/issue-512, r=brson
Closes #512
bors [Mon, 8 Sep 2014 17:58:56 +0000 (17:58 +0000)]
auto merge of #515 : alexcrichton/cargo/issue-472, r=brson
But still show it with --verbose
Closes #473
Alex Crichton [Sun, 7 Sep 2014 23:01:55 +0000 (16:01 -0700)]
Mention the name of a package in a custom build failure
Closes #530
Alex Crichton [Sun, 7 Sep 2014 22:39:57 +0000 (15:39 -0700)]
Update libssh2-static-sys to build on msys2
bors [Sun, 7 Sep 2014 19:43:53 +0000 (19:43 +0000)]
auto merge of #522 : EduardoBautista/cargo/update-docs, r=alexcrichton
This PR will make the guide more generic in terms of directory paths and crate information. It also
updates some outdated output.
bors [Sun, 7 Sep 2014 18:58:58 +0000 (18:58 +0000)]
auto merge of #513 : bkoropoff/cargo/revert-static, r=alexcrichton
This reverts a commit that worked around an overly restrictive lifetime bound on the `Writer` impl for `Box<Writer>` in libstd. Now that this restriction has been lifted, the workaround can be reverted.
Alex Crichton [Sun, 7 Sep 2014 18:48:35 +0000 (11:48 -0700)]
Don't deadlock when a dep has no libs
Alex Crichton [Sun, 7 Sep 2014 18:26:07 +0000 (11:26 -0700)]
Don't run cargo as root during `make install`
This rejiggers the dependencies for `make install` to only copy files into the
destination, never assemble anything. This adds a hard requirement that `make`
is executed before `make install`.
Closes #519
Alex Crichton [Sun, 7 Sep 2014 18:25:26 +0000 (11:25 -0700)]
Add a note about required build tools and packages
Closes #518
Eduardo Bautista [Sun, 7 Sep 2014 04:39:18 +0000 (23:39 -0500)]
Update output to match latest cargo build
Eduardo Bautista [Sun, 7 Sep 2014 04:38:28 +0000 (23:38 -0500)]
Make docs more generic
Alex Crichton [Fri, 5 Sep 2014 17:18:40 +0000 (10:18 -0700)]
Remove an outdated module
Closes #512
Alex Crichton [Fri, 5 Sep 2014 17:15:10 +0000 (10:15 -0700)]
Don't show `Fresh` by default
But still show it with --verbose
Closes #473
bors [Fri, 5 Sep 2014 15:24:41 +0000 (15:24 +0000)]
auto merge of #503 : alexcrichton/cargo/issue-493, r=brson
This commit updates git2-rs to get the implementation of the authentication
callback in libgit2. Additionally this specifies the callback for whenever we're
cloning into the database or updating submodules.
Currently cargo will *not* ask for user input, but rather require you to have
authentication configured in git through some other means. There are currently
two primary methods of doing so:
1. Any SSH key in the local ssh-agent will be used for authentication with SSH
repositories.
2. The `credential.helper` interface (as specified by gitcredential(7)) has been
implemented in git2-rs to allow for picking up of storage of passwords in the
local git cache or keychain.
If these two methods fail, then there will likely be an authentication failure.
Interactive prompts for authentication have not been implemented as there is no
method to currently enter your password into the terminal silently.
A consequence of this commit is that cargo now depends on libssh2. A package was
created to create a static copy of libssh2, and this is now linked into cargo by
default.
It turned out that just building libssh2 was quite a beast in and of itself on
windows. The primary stickler point is that on the current release, 1.4.3,
libssh2 requires openssl on windows. At this time I don't want to pick up a
dependency on openssl for windows, and it turned out that the unreleased 1.4.4
version has a new backend for windows not based on openssl, but rather windows's
cryptography API.
The current bundled version of libssh2 is 1.4.4 with some light modifications to
actually build on windows (wow that was hard). All in all, we're now statically
linking to libssh 1.4.4 (not a runtime dependency).
Closes #493
Alex Crichton [Mon, 1 Sep 2014 06:03:45 +0000 (23:03 -0700)]
Implement git authentication
This commit updates git2-rs to get the implementation of the authentication
callback in libgit2. Additionally this specifies the callback for whenever we're
cloning into the database or updating submodules.
Currently cargo will *not* ask for user input, but rather require you to have
authentication configured in git through some other means. There are currently
two primary methods of doing so:
1. Any SSH key in the local ssh-agent will be used for authentication with SSH
repositories.
2. The `credential.helper` interface (as specified by gitcredential(7)) has been
implemented in git2-rs to allow for picking up of storage of passwords in the
local git cache or keychain.
If these two methods fail, then there will likely be an authentication failure.
Interactive prompts for authentication have not been implemented as there is no
method to currently enter your password into the terminal silently.
A consequence of this commit is that cargo now depends on libssh2. A package was
created to create a static copy of libssh2, and this is now linked into cargo by
default.
It turned out that just building libssh2 was quite a beast in and of itself on
windows. The primary stickler point is that on the current release, 1.4.3,
libssh2 requires openssl on windows. At this time I don't want to pick up a
dependency on openssl for windows, and it turned out that the unreleased 1.4.4
version has a new backend for windows not based on openssl, but rather windows's
cryptography API.
The current bundled version of libssh2 is 1.4.4 with some light modifications to
actually build on windows (wow that was hard). All in all, we're now statically
linking to libssh 1.4.4 (not a runtime dependency).
Closes #493
Brian Koropoff [Fri, 5 Sep 2014 08:15:11 +0000 (01:15 -0700)]
Add back fix for cross compile tests
This change was accidentally included in the reverted commit.
Brian Koropoff [Fri, 5 Sep 2014 07:18:44 +0000 (00:18 -0700)]
Revert "Be compatible with the stdlib for now ('static shell)"
This reverts commit
a601d049feff5768b0d99b9fcec807b277fa4c81.
bors [Thu, 4 Sep 2014 13:47:05 +0000 (13:47 +0000)]
auto merge of #505 : suhr/cargo/cargo-travis, r=alexcrichton
This implements https://github.com/rust-lang/cargo/issues/489 and fast-fixes https://github.com/rust-lang/cargo/issues/504.
PS: why &* thing is now explicit? This change is rather surprising for me.
Сухарик [Thu, 4 Sep 2014 09:37:09 +0000 (13:37 +0400)]
Merge with upstream and update Cargo.lock
Conflicts:
src/bin/new.rs
src/cargo/ops/cargo_new.rs
Сухарик [Thu, 4 Sep 2014 09:21:56 +0000 (13:21 +0400)]
cargo/new: add a test for the `--travis` flag
Сухарик [Thu, 4 Sep 2014 09:20:37 +0000 (13:20 +0400)]
Revert "cargo/new: add test for `--travis flag; also update Cargo.lock"
This reverts commit
4ee5fd352a0071f4200fe9f3dfa4aeebfe164c18.
bors [Thu, 4 Sep 2014 03:57:39 +0000 (03:57 +0000)]
auto merge of #508 : carllerche/cargo/static-lib-and-bin-bug, r=alexcrichton
rustc cannot take .a files, so don't pass them
Carl Lerche [Thu, 4 Sep 2014 00:36:41 +0000 (17:36 -0700)]
Do not pass static lib targets to rustc
bors [Wed, 3 Sep 2014 22:20:06 +0000 (22:20 +0000)]
auto merge of #474 : alexcrichton/cargo/issue-461, r=wycats
Overrides are only queried by name, and it's possible for multiple to show up,
and just pick the first one.
Closes #461
r? @wycats -- I'm not convinced this is correct
bors [Wed, 3 Sep 2014 21:01:00 +0000 (21:01 +0000)]
auto merge of #470 : alexcrichton/cargo/cargo-new-git, r=brson
This adds a command-line --no-git option to disable this behavior, as well as
adding a global config section for `git = false`. While I was at it I write some
documentation for the configuration format that cargo uses.
Alex Crichton [Thu, 28 Aug 2014 20:22:36 +0000 (13:22 -0700)]
Turn --git on by default for `cargo-new`.
This adds a command-line --no-git option to disable this behavior, as well as
adding a global config section for `git = false`. While I was at it I write some
documentation for the configuration format that cargo uses.
bors [Wed, 3 Sep 2014 20:13:56 +0000 (20:13 +0000)]
auto merge of #507 : alexcrichton/cargo/profiles, r=brson
For documentation, see the included documentation in the commit.
Alex Crichton [Wed, 3 Sep 2014 18:54:47 +0000 (11:54 -0700)]
Re-enable passing -g to rustc
Now that there is a way to disable debuginfo for a build, we can go back to
passing it by default. Any bugs in debuginfo will get weeded out by specifying
`debug = false` in the profile.